1) Field of the Invention
The present invention relates to a rendering apparatus that performs alpha blending (transparent rendering).
2) Description of the Related Art
A rendering apparatus, such as a computer and a car navigation system, displays an image on a display by reading out its image data from a frame buffer. In general, inexpensive and low-speed memories like a synchronous DRAM (SDRAM) are used as the frame buffer which requires a large capacity. The rendering apparatus can include, as well as the frame buffer, an expensive and high-speed synchronous RAM (SRAM) as a temporary memory with a small capacity. The rendering apparatus with the temporary memory can render the image at high speed, since the image data of which is written in the SRAM and read out from the SRAM to the frame buffer.
Such a rendering apparatus can render the image more rapidly if it is provided with a plurality of temporary memories and a plurality of rendering units actuated in parallel. However, one rendering unit has to refer to a temporary memory of another rendering unit because an image previously rendered is required in the alpha blending. Thus, the rendering apparatus which is merely provided with the temporary memory and the rendering unit in plural does not always operate correctly.
Therefore, as shown in FIG. 15, one temporary memory 2 can be provided and accessed by a plurality of rendering units 3 and 4. However, when the rendering units 3 and 4 access the temporary memory 2 simultaneously, it is necessary to allow only one access and prohibit the other access since an SRAM used as the temporary memory 2 cannot process a plurality of accesses simultaneously. Thus, an arbitration unit 5 is required which arbitrates the accesses. As a result, only one rendering unit 3 accesses the temporary memory 2 while the other rendering unit 4 is waiting. Thus, there is a problem in that speedup of rendering in the apparatus as a whole cannot be realized.
Alternatively, as shown in FIG. 16, a plurality of temporary memories 6 and 7 can be provided and connected to a plurality of rendering units 3 and 4, respectively . However, it is necessary that image data in the temporary memory 6 and image data in the temporary memory 7 do not overlap on the frame buffer 1 at all. In this case, an overlap judging/distributing unit 8 is required to assure that figures to be rendered do not overlap at all. However, there is a problem in that speedup of rendering in the apparatus as a whole cannot be realized since the processing performed by the overlap judging/distributing unit 8 takes time.
On the other hand, there is a display control apparatus that performs transmission/non-transmission processing in display processing after performing the alpha blending in rendering processing. There is a method of setting a specific color as a transparent color and transmitting or not transmitting a color depending on whether the color is the specific color (see FIGS. 17A to 17C). There is also a method of adding transmittance information to color information and performing the transmission/non-transmission processing according to the transmittance.
FIG. 17A is a screen subjected to transmission/non-transmission processing without alpha blending in rendering processing. FIG. 17B is a background screen. FIG. 17C is a result of the transmission/non-transmission processing. In FIG. 17A, a lower half of a triangle 12 is buried in a trapezoid 11. Parts of backgrounds 13 and 14 shown in FIG. 17B are also shown in FIG. 17C. However, the trapezoid 11 and the triangle 12 on the backgrounds 13 and 14 are not transparent.
The alpha blending in rendering processing is performed to an image in the frame buffer. The frame buffer is cleared with an initial value, which is 0 in general (that is, black). The alpha blending is performed to this initial image in which nothing is yet drawn.
The triangle 12 shown in FIG. 18B is a result of the alpha blending in rendering processing performed to the triangle 12 shown in FIG. 18A (same as FIG. 17A). In FIG. 18A, since the triangle 12 is not transparent, parts of the trapezoid 11 and a background 15 overlapping the triangle 12 are not seen. On the other hand, in FIG. 18B, a color and a pattern of the background 15 are seen weakly in an upper half 16 of the triangle 12 and a color and a pattern of the trapezoid 11 are seen weakly in a lower half 17 of the triangle 12, since the triangle 12 is semi-transparent.
Furthermore, there is a display control apparatus that performs alpha blending, in stead of the transmission/non-transmission processing, in display processing after performing it in rendering processing (the alpha blending can be performed in display processing as well as in rendering processing). The alpha blending in display processing is a processing to blend a plurality of images created and stored in the frame buffer in rendering processing.
However, as explained above, the alpha blending in rendering processing is applied to the initial image of black. Thus, black color is transparent in the blended image. When this image is subjected to the alpha blending in display processing, a blackish color can be seen in the blended image which is displayed on a display. When the transmission/non-transmission processing is performed in display processing, in stead of the alpha blending, a non-transparent part has a blackish color on the display and is not blended with a background screen (see FIGS. 19A to 19D).
FIG. 19A is a screen subjected to transmission/non-transmission processing with alpha blending in rendering processing. FIG. 19B is a background screen. FIG. 19C is a result of the transmission/non-transmission processing. In FIG. 19A, the triangle 12 is transparent and the lower half of which is buried in the trapezoid 11. Thus, a color and a pattern of the background 15 are seen weakly in the upper half 16 of the triangle 12 and a color and a pattern of the trapezoid 11 are seen weakly in the lower half 17 of the triangle 12. The backgrounds 13 and 14 around the trapezoid 11 and the triangle 12 shown in FIG. 19C are the same as those shown in FIG. 19B. However, the color and the pattern of the background 15 shown in FIG. 19A are still seen weakly in the upper half 16 of the triangle 12.
Originally, as shown in FIG. 19D, a color and a pattern of the background 13 in an upper half of FIG. 19B have to be seen weakly since the triangle 12 is semi-transparent. However, as described above, conventional technology has a problem in that an unintended image can be displayed when the alpha blending is performed in rendering processing and the transmission/non-transmission processing is performed in display processing, or when the alpha blending is performed not only in rendering processing but also display processing.